package com.raos.lottery.redis.events;

import org.springframework.context.ApplicationEvent;

import java.util.concurrent.CountDownLatch;

/**
 * 初始化奖品 至 Redis 事件
 *
 * @author raos
 * @emil 991207823@qq.com
 * @date 2021/7/21 23:01
 */
public class InitPrizeToRedisEvent extends ApplicationEvent {
    /**
     * 抽奖活动id
     */
    private Integer lotteryId;

    /**
     * 倒计时计数器
     */
    private CountDownLatch countDownLatch;

    public InitPrizeToRedisEvent(Object source, Integer lotteryId, CountDownLatch countDownLatch) {
        super(source);
        this.lotteryId=lotteryId;
        this.countDownLatch=countDownLatch;
    }

    public Integer getLotteryId() {
        return lotteryId;
    }

    public void setLotteryId(Integer lotteryId) {
        this.lotteryId = lotteryId;
    }

    public CountDownLatch getCountDownLatch() {
        return countDownLatch;
    }

    public void setCountDownLatch(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }

}
